package com.api.core.domain.query.intergration;

import com.alibaba.fastjson2.JSONObject;
import com.api.common.utils.StringUtils;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class RobotLatestScoreQuery {
    private String robotCode;
    private String strRobotNames;
    private JSONObject robotNameLocales;
    private Long robotId;
    private String type = "robot";
    private List<ElementLatestScoreQuery> children;

    public void setStrRobotNames(String strRobotNames){
        if(StringUtils.isNotBlank(strRobotNames))
            this.robotNameLocales = JSONObject.parseObject(strRobotNames);
        this.strRobotNames = strRobotNames;
    }

    public void setRobotNameLocales(String robotNameLocales) {
        this.robotNameLocales = JSONObject.parseObject(robotNameLocales);
    }
}
